#—*—coding:utf-8 -*-
#@Time        :2022/7/15 20:52
#@Author      :dhx
#@File        :base_pageage.py
# @Software: PyCharm
from selenium import webdriver
class BasePage():
    """基类"""
    def __init__(self,driver):
        """创建浏览器"""
        self.driver=driver
    def open(self,url):
        self.driver.get(url)
    def current_url(self):
        """当前url"""
        return  self.driver.current_url
    def find(self,locator):
        """find_element"""
        element = self.driver.find_element(*locator)
        return element